#ifndef _LIBISP_CONFIG_H
#define _LIBISP_CONFIG_H

#define ISP_CFA 2

#include "boards/bebop/mt9f002.h"

#define MT9F002_BAYERSTATS_STATX 64
#define MT9F002_BAYERSTATS_STATY 48

#define MT9F002_FISHEYE_RADIUS 1920
#define MT9F002_FISHEYE_CENTER_X ((CFG_MT9F002_X_ADDR_MAX + CFG_MT9F002_X_ADDR_MIN)/2)
#define MT9F002_FISHEYE_CENTER_Y ((CFG_MT9F002_Y_ADDR_MAX + CFG_MT9F002_Y_ADDR_MIN)/2)
#define MT9F002_SENSOR_HEIGHT (CFG_MT9F002_Y_ADDR_MAX - CFG_MT9F002_Y_ADDR_MIN)
#define MT9F002_SENSOR_WIDTH  (CFG_MT9F002_X_ADDR_MAX - CFG_MT9F002_X_ADDR_MIN)

#define COMPLEMENT_2(i, r) (((i) >= 0) ? (r) : (~(r) + 1) & 0x3fff)
#define Q311(i) (COMPLEMENT_2(i, (unsigned)(((ABS(i)) * (1 << 11)) + 0.5)))
#define AVI_CONV_MATRIX(_c00, _c01, _c02,                                    \
                        _c10, _c11, _c12,                                    \
                        _c20, _c21, _c22)                                    \
        .coeff_01_00 = {{ .coeff_00 = Q311(_c00), .coeff_01 = Q311(_c01) }}, \
        .coeff_10_02 = {{ .coeff_02 = Q311(_c02), .coeff_10 = Q311(_c10) }}, \
        .coeff_12_11 = {{ .coeff_11 = Q311(_c11), .coeff_12 = Q311(_c12) }}, \
        .coeff_21_20 = {{ .coeff_20 = Q311(_c20), .coeff_21 = Q311(_c21) }}, \
        .coeff_22    = {{ .coeff_22 = Q311(_c22) }}

#define AVI_CONV_OFFSETS(_ryin, _ryout,                                 \
                         _guin, _guout,                                 \
                         _bvin, _bvout)                                 \
        .offset_ry = {{ .offset_in = _ryin, .offset_out = _ryout }},    \
        .offset_gu = {{ .offset_in = _guin, .offset_out = _guout }},    \
        .offset_bv = {{ .offset_in = _bvin, .offset_out = _bvout }}

#define AVI_CONV_CLIPS(_rymin, _rymax,                                  \
                       _gumin, _gumax,                                  \
                       _bvmin, _bvmax)                                  \
        .clip_ry = {{ .clip_min = _rymin, .clip_max = _rymax }},        \
        .clip_gu = {{ .clip_min = _gumin, .clip_max = _gumax }},        \
        .clip_bv = {{ .clip_min = _bvmin, .clip_max = _bvmax }}

struct libisp_config isp_config = {
  /* RAW 10bit to 10bit */
  .vlformat_32to40 = {{
      .format = 0x00,
  }},

  /* Don't bypass a bayer function */
  .bayer_inter = {{
      .pedestal_bypass     = 0,//0
      .grim_bypass         = 0,
      .rip_bypass          = 1,
      .denoise_bypass      = 0,//0
      .lsc_bypass          = 0,//0
      .chroma_aber_bypass  = 1,
      .bayer_bypass        = 0,//0
      .color_matrix_bypass = 0,//0
  }},

  /* Pedestal */
  .pedestal = {
      .cfa    = {{  ISP_CFA }},
      .sub_r  = {{ 42 }},
      .sub_gb = {{ 42 }},
      .sub_gr = {{ 42 }},
      .sub_b  = {{ 42 }},
  },

  /* Green imbalance (grim) */
  .green_imbalance = {
      .bayer_cfa   = {{ ISP_CFA }},
      .offset_x_y  = {._register = 4718720},
      .cell_id_x_y = {._register = 131076},
      .cell_w      = {{288}},
      .cell_h      = {{274}},
      .cell_w_inv  = {{455}},
      .cell_h_inv  = {{478}},
      .alpha       = {{58254}},
      .beta        = {{34442}},
  },

  .grim_gr = {
    .red_coeff_mem = {
        {{64}}, {{ 64}},  {{64}},  {{72}},  {{61}},  {{61}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{62}},  {{64}},  {{64}},  {{64}},
        {{64}}, {{ 64}},  {{74}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{59}},  {{64}},  {{64}},
        {{64}}, {{ 64}},  {{61}},  {{60}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{34}},  {{64}},
        {{64}}, {{102}},  {{60}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{63}},  {{64}},
        {{64}}, {{ 61}},  {{60}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{63}},  {{64}},
        {{64}}, {{ 61}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{64}},  {{64}},
        {{64}}, {{ 61}},  {{60}},  {{60}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{64}},  {{64}},
        {{64}}, {{ 61}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{64}},  {{64}},  {{64}},
        {{64}}, {{ 61}},  {{61}},  {{60}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{63}},  {{63}},  {{64}},
        {{64}}, {{ 64}},  {{61}},  {{60}},  {{60}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{63}},  {{63}},  {{64}},
        {{64}}, {{ 64}},  {{61}},  {{60}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{63}},  {{64}},  {{64}},
        {{64}}, {{ 64}},  {{64}},  {{60}},  {{61}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{63}},  {{63}},  {{62}},  {{64}},  {{64}},
        {{64}}, {{ 64}},  {{64}},  {{64}},  {{60}},  {{60}},  {{61}},  {{61}},  {{61}},  {{62}},  {{62}},  {{62}},  {{62}},  {{62}},  {{64}},  {{64}},  {{64}},
    }
  },

  .grim_gb = {
    .green_coeff_mem = {
        {{64}},  {{64}},  {{64}},  {{55}},  {{67}},  {{67}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{66}},  {{64}},  {{64}},  {{64}},
        {{64}},  {{64}},  {{53}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{69}},  {{64}},  {{64}},
        {{64}},  {{64}},  {{67}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{95}},  {{64}},
        {{64}},  {{22}},  {{68}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{65}},  {{64}},
        {{64}},  {{68}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{65}},  {{64}},
        {{64}},  {{68}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{64}},  {{64}},
        {{64}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{64}},  {{64}},
        {{64}},  {{67}},  {{68}},  {{68}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{64}},  {{64}},  {{64}},
        {{64}},  {{67}},  {{68}},  {{68}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{65}},  {{65}},  {{64}},
        {{64}},  {{64}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{65}},  {{65}},  {{64}},
        {{64}},  {{64}},  {{67}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{65}},  {{64}},  {{64}},
        {{64}},  {{64}},  {{64}},  {{68}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{65}},  {{65}},  {{66}},  {{64}},  {{64}},
        {{64}},  {{64}},  {{64}},  {{64}},  {{68}},  {{68}},  {{68}},  {{67}},  {{67}},  {{66}},  {{66}},  {{66}},  {{66}},  {{66}},  {{64}},  {{64}},  {{64}},
    }
  },

  /* Dead pixel correction (for now bypass) */
  .dead_pixel_correction = {
      .cfa = {{ ISP_CFA }},
      .bypass = { ._register = 1 },
      .threshold = {{ 0xdc }},
      .rgrim_conf = { ._register = 0x40264006 },
      .rgrim_gain = {{ 0x52 }},
  },

  /* Denoising */
  .denoising = {
    .cfa = {{ ISP_CFA }},
    .lumocoeff_r_03_00 = {{ 0,   0,   1,   2 }},
    .lumocoeff_r_07_04 = {{ 4,   6,   9,  13 }},
    .lumocoeff_r_11_08 = {{ 16,  18,  21,  23 }},
    .lumocoeff_r_13_12 = {{ 25,  26 }},
    .lumocoeff_g_03_00 = {{ 0,   1,   1,   2 }},
    .lumocoeff_g_07_04 = {{ 4,   6,   8,  12 }},
    .lumocoeff_g_11_08 = {{ 15,  18,  20,  22 }},
    .lumocoeff_g_13_12 = {{ 24,  26 }},
    .lumocoeff_b_03_00 = {{ 0,   0,   1,   2 }},
    .lumocoeff_b_07_04 = {{ 4,   6,   9,  13 }},
    .lumocoeff_b_11_08 = {{ 16,  19,  21,  23 }},
    .lumocoeff_b_13_12 = {{ 25,  27 }},
  },

  .statistics_bayer = {
    .measure_req           = {{ 0 }},
    .window_x              = {{ .x_offset = ((MT9F002_SENSOR_WIDTH  - ((MT9F002_SENSOR_WIDTH  / MT9F002_BAYERSTATS_STATX) & 0xFFFFFFFE)*MT9F002_BAYERSTATS_STATX) / 2) & 0xFFFFFFFE, .x_width = (MT9F002_SENSOR_WIDTH  / MT9F002_BAYERSTATS_STATX) & 0xFFFFFFFE }},
    .window_y              = {{ .y_offset = ((MT9F002_SENSOR_HEIGHT - ((MT9F002_SENSOR_HEIGHT / MT9F002_BAYERSTATS_STATY) & 0xFFFFFFFE)*MT9F002_BAYERSTATS_STATY) / 2) & 0xFFFFFFFE, .y_width = (MT9F002_SENSOR_HEIGHT / MT9F002_BAYERSTATS_STATY) & 0xFFFFFFFE }},
    .circle_pos_x_center   = {{ MT9F002_FISHEYE_CENTER_X }},
    .circle_pos_x_squared  = {{ MT9F002_FISHEYE_CENTER_X * MT9F002_FISHEYE_CENTER_X }},
    .circle_pos_y_center   = {{ MT9F002_FISHEYE_CENTER_Y }},
    .circle_pos_y_squared  = {{ MT9F002_FISHEYE_CENTER_Y * MT9F002_FISHEYE_CENTER_Y }},
    .circle_radius_squared = {{ MT9F002_FISHEYE_RADIUS * MT9F002_FISHEYE_RADIUS}},
    .increments_log2       = {{ 0, 0}},
    .sat_threshold         = {{ 980 }}, //1022 - pedestal
    .cfa                   = {{ ISP_CFA }},
    .max_nb_windows        = {{ .x_window_count=MT9F002_BAYERSTATS_STATX, .y_window_count=MT9F002_BAYERSTATS_STATY }},
  },

  /* Lens shading correction + AWB */
  .lens_shading_correction = {
    .bayer_cfa   = {{ ISP_CFA }},
    .offset_x_y  = { ._register = 4718720 },
    .cell_id_x_y = { ._register = 131076 },
    .cell_w      = {{ 288 }},
    .cell_h      = {{ 274 }},
    .cell_w_inv  = {{ 455 }},
    .cell_h_inv  = {{ 478 }},
    .alpha       = {{ 0 }},
    .beta        = {{ 0 }},
    .threshold   = {{ .threshold_r=981, .threshold_g=981, .threshold_b=981 }}, // 1023 - pedestal
    .gain        = {{ .gain_r = 386, .gain_g = 256, .gain_b = 318 }}, // For AWB
  },

  .lsc_red_coeffs = {
    .red_coeff_mem = {
      {{64}}, {{ 64}}, {{ 64}}, {{153}}, {{129}}, {{ 91}}, {{ 82}},  {{77}},  {{75}},  {{76}},  {{80}}, {{ 86}}, {{106}}, {{195}}, {{ 64}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{125}}, {{120}}, {{ 86}}, {{ 77}}, {{ 71}},  {{69}},  {{68}},  {{70}},  {{71}}, {{ 74}}, {{ 82}}, {{ 94}}, {{214}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{127}}, {{ 92}}, {{ 80}}, {{ 70}}, {{ 67}},  {{65}},  {{65}},  {{65}},  {{67}}, {{ 69}}, {{ 76}}, {{ 83}}, {{105}}, {{255}},  {{64}},
      {{64}}, {{255}}, {{113}}, {{ 83}}, {{ 73}}, {{ 66}}, {{ 65}},  {{64}},  {{65}},  {{65}},  {{65}}, {{ 67}}, {{ 70}}, {{ 79}}, {{ 91}}, {{115}},  {{64}},
      {{64}}, {{123}}, {{100}}, {{ 80}}, {{ 69}}, {{ 65}}, {{ 64}},  {{65}},  {{65}},  {{65}},  {{66}}, {{ 66}}, {{ 68}}, {{ 74}}, {{ 84}}, {{109}},  {{64}},
      {{64}}, {{123}}, {{ 95}}, {{ 77}}, {{ 67}}, {{ 64}}, {{ 64}},  {{64}},  {{65}},  {{65}},  {{66}}, {{ 66}}, {{ 67}}, {{ 72}}, {{ 82}}, {{104}},  {{64}},
      {{64}}, {{120}}, {{ 97}}, {{ 76}}, {{ 67}}, {{ 64}}, {{ 64}},  {{65}},  {{64}},  {{65}},  {{66}}, {{ 66}}, {{ 68}}, {{ 71}}, {{ 83}}, {{102}},  {{64}},
      {{64}}, {{122}}, {{100}}, {{ 78}}, {{ 68}}, {{ 64}}, {{ 64}},  {{65}},  {{65}},  {{65}},  {{65}}, {{ 66}}, {{ 68}}, {{ 71}}, {{ 87}}, {{102}},  {{64}},
      {{64}}, {{136}}, {{111}}, {{ 85}}, {{ 70}}, {{ 66}}, {{ 64}},  {{65}},  {{65}},  {{66}},  {{65}}, {{ 66}}, {{ 69}}, {{ 75}}, {{ 92}}, {{106}},  {{64}},
      {{64}}, {{ 64}}, {{113}}, {{100}}, {{ 76}}, {{ 70}}, {{ 66}},  {{65}},  {{65}},  {{65}},  {{66}}, {{ 69}}, {{ 72}}, {{ 85}}, {{101}}, {{122}},  {{64}},
      {{64}}, {{ 64}}, {{133}}, {{110}}, {{ 91}}, {{ 76}}, {{ 71}},  {{68}},  {{68}},  {{68}},  {{70}}, {{ 73}}, {{ 80}}, {{ 98}}, {{108}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{125}}, {{113}}, {{ 93}}, {{ 82}},  {{76}},  {{76}},  {{75}},  {{79}}, {{ 85}}, {{102}}, {{107}}, {{155}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{ 64}}, {{135}}, {{109}}, {{106}},  {{92}},  {{90}},  {{90}},  {{97}}, {{104}}, {{118}}, {{159}}, {{ 64}}, {{ 64}},  {{64}},
    }
  },

  .lsc_green_coeffs = {
    .green_coeff_mem = {
      {{64}}, {{ 64}}, {{ 64}}, {{127}}, {{129}}, {{ 91}}, {{ 82}},  {{77}},  {{76}},  {{77}},  {{81}}, {{ 87}}, {{106}}, {{185}}, {{ 64}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 76}}, {{120}}, {{ 86}}, {{ 77}}, {{ 72}},  {{70}},  {{69}},  {{71}},  {{72}}, {{ 76}}, {{ 84}}, {{ 96}}, {{196}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{128}}, {{ 92}}, {{ 80}}, {{ 70}}, {{ 67}},  {{66}},  {{66}},  {{66}},  {{68}}, {{ 70}}, {{ 77}}, {{ 84}}, {{106}}, {{255}},  {{64}},
      {{64}}, {{255}}, {{115}}, {{ 83}}, {{ 73}}, {{ 67}}, {{ 65}},  {{65}},  {{65}},  {{65}},  {{65}}, {{ 67}}, {{ 71}}, {{ 80}}, {{ 92}}, {{113}},  {{64}},
      {{64}}, {{125}}, {{101}}, {{ 81}}, {{ 69}}, {{ 66}}, {{ 65}},  {{65}},  {{65}},  {{65}},  {{65}}, {{ 66}}, {{ 68}}, {{ 75}}, {{ 85}}, {{108}},  {{64}},
      {{64}}, {{126}}, {{ 97}}, {{ 77}}, {{ 68}}, {{ 65}}, {{ 65}},  {{65}},  {{65}},  {{65}},  {{66}}, {{ 66}}, {{ 67}}, {{ 72}}, {{ 83}}, {{104}},  {{64}},
      {{64}}, {{123}}, {{ 98}}, {{ 77}}, {{ 68}}, {{ 65}}, {{ 65}},  {{65}},  {{64}},  {{65}},  {{65}}, {{ 65}}, {{ 68}}, {{ 71}}, {{ 84}}, {{101}},  {{64}},
      {{64}}, {{125}}, {{101}}, {{ 78}}, {{ 68}}, {{ 65}}, {{ 64}},  {{65}},  {{65}},  {{65}},  {{65}}, {{ 65}}, {{ 68}}, {{ 72}}, {{ 87}}, {{101}},  {{64}},
      {{64}}, {{137}}, {{111}}, {{ 86}}, {{ 70}}, {{ 67}}, {{ 65}},  {{65}},  {{65}},  {{66}},  {{65}}, {{ 66}}, {{ 69}}, {{ 75}}, {{ 91}}, {{103}},  {{64}},
      {{64}}, {{ 64}}, {{112}}, {{ 99}}, {{ 75}}, {{ 70}}, {{ 66}},  {{65}},  {{65}},  {{65}},  {{66}}, {{ 68}}, {{ 71}}, {{ 84}}, {{ 98}}, {{117}},  {{64}},
      {{64}}, {{ 64}}, {{131}}, {{109}}, {{ 90}}, {{ 75}}, {{ 71}},  {{68}},  {{67}},  {{68}},  {{69}}, {{ 72}}, {{ 79}}, {{ 96}}, {{105}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{122}}, {{111}}, {{ 92}}, {{ 81}},  {{75}},  {{74}},  {{74}},  {{77}}, {{ 83}}, {{ 99}}, {{103}}, {{146}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{ 64}}, {{131}}, {{107}}, {{103}},  {{90}},  {{88}},  {{87}},  {{94}}, {{100}}, {{112}}, {{149}}, {{ 64}}, {{ 64}},  {{64}},
    }
  },

  .lsc_blue_coeffs = {
    .blue_coeff_mem = {
      {{64}}, {{ 64}}, {{ 64}}, {{119}}, {{115}},  {{86}},  {{79}},  {{76}},  {{75}},  {{75}},  {{78}},  {{82}},  {{96}}, {{154}}, {{ 64}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 83}}, {{108}}, {{ 82}},  {{75}},  {{71}},  {{70}},  {{69}},  {{70}},  {{71}},  {{73}},  {{79}}, {{ 88}}, {{165}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{112}}, {{ 85}}, {{ 77}},  {{70}},  {{67}},  {{66}},  {{66}},  {{66}},  {{67}},  {{68}},  {{73}}, {{ 78}}, {{ 94}}, {{255}},  {{64}},
      {{64}}, {{255}}, {{101}}, {{ 78}}, {{ 71}},  {{66}},  {{65}},  {{65}},  {{65}},  {{65}},  {{65}},  {{66}},  {{68}}, {{ 74}}, {{ 83}}, {{ 99}},  {{64}},
      {{64}}, {{108}}, {{ 90}}, {{ 76}}, {{ 68}},  {{65}},  {{65}},  {{65}},  {{65}},  {{65}},  {{64}},  {{64}},  {{65}}, {{ 70}}, {{ 77}}, {{ 95}},  {{64}},
      {{64}}, {{108}}, {{ 86}}, {{ 73}}, {{ 66}},  {{65}},  {{65}},  {{65}},  {{65}},  {{65}},  {{64}},  {{64}},  {{64}}, {{ 68}}, {{ 75}}, {{ 90}},  {{64}},
      {{64}}, {{106}}, {{ 87}}, {{ 72}}, {{ 66}},  {{64}},  {{65}},  {{65}},  {{64}},  {{64}},  {{64}},  {{63}},  {{64}}, {{ 67}}, {{ 75}}, {{ 88}},  {{64}},
      {{64}}, {{106}}, {{ 89}}, {{ 73}}, {{ 67}},  {{64}},  {{64}},  {{65}},  {{64}},  {{64}},  {{64}},  {{63}},  {{65}}, {{ 67}}, {{ 77}}, {{ 88}},  {{64}},
      {{64}}, {{115}}, {{ 95}}, {{ 78}}, {{ 67}},  {{65}},  {{64}},  {{64}},  {{64}},  {{64}},  {{63}},  {{63}},  {{65}}, {{ 69}}, {{ 80}}, {{ 90}},  {{64}},
      {{64}}, {{ 64}}, {{ 96}}, {{ 87}}, {{ 70}},  {{67}},  {{64}},  {{64}},  {{63}},  {{63}},  {{63}},  {{65}},  {{67}}, {{ 75}}, {{ 86}}, {{100}},  {{64}},
      {{64}}, {{ 64}}, {{109}}, {{ 93}}, {{ 80}},  {{70}},  {{67}},  {{65}},  {{65}},  {{64}},  {{66}},  {{67}},  {{72}}, {{ 84}}, {{ 91}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{102}}, {{ 94}},  {{81}},  {{74}},  {{70}},  {{69}},  {{69}},  {{71}},  {{74}},  {{86}}, {{ 89}}, {{121}}, {{ 64}},  {{64}},
      {{64}}, {{ 64}}, {{ 64}}, {{ 64}}, {{109}},  {{90}},  {{88}},  {{79}},  {{77}},  {{77}},  {{82}},  {{86}},  {{95}}, {{124}}, {{ 64}}, {{ 64}},  {{64}},
    }
  },

  /* Chromatic abberation (For now just bypass as it has too many difficult registers to set) */
  /*
    .chromatic_aberration = {
    .circle_pos_x_center = {{ 2356 }},
    .circle_pos_x_squared = {{ 5550736 }},
    .circle_pos_y_center = {{ 1585 }},
    .circle_pos_y_squared = {{ 2512225 }},
    .cfa = {{ ISP_CFA }},
    .green_variation = {{ 1 }},
    .increments_log2 = {{ .x_log2_inc=0, .y_log2_inc=0 }},
  },*/

  /* Demosaicking */
  .bayer = {
    .cfa         = {{ ISP_CFA }}, /* GRGB (top left to bottom right order) */
    .threshold_1 = {{   20 }}, /* Lower threshold */
    .threshold_2 = {{  500 }}, /* Upper threshold */
  },

  /* Color correction */
  .color_correction = {
    .coeff_01_00 = { ._register = 0xF3811477 },
    .coeff_10_02 = { ._register = 0xFDF0021d },
    .coeff_12_11 = { ._register = 0xFF9E0A33 },
    .coeff_21_20 = { ._register = 0xF4DFFE25 },
    .coeff_22    = { ._register = 0x00001B83 },
    .offset_ry   = { ._register = 0x00000000 },
    .clip_ry     = { ._register = 0x03FF0000 },
    .offset_gu   = { ._register = 0x00000000 },
    .clip_gu     = { ._register = 0x03FF0000 },
    .offset_bv   = { ._register = 0x00000000 },
    .clip_bv     = { ._register = 0x03FF0000 },
  },

  /* RAW 10bit to 10bit */
  .vlformat_40to32 = {{
    .format = 0x03,
  }},

  /* Gamma corrector (Curves) */
  .gamma_corrector = {
    .conf = {{
      .bypass = 0,    /* Enable gamma corrector */
      .palette = 0,   /* Non-linear correction mode (curve) */
      .comp_width = 1 /* 10-bit */
    }}
  },

  .gc_ry_lut = {
    .ry_lut = {
     {{  0}},  {{  1}},  {{  1}},  {{  1}},  {{  2}},  {{  2}},  {{  3}},  {{  3}},  {{  4}},  {{  4}},  {{  5}},  {{  5}},  {{  6}},  {{  7}},  {{  7}},  {{  8}},  {{  9}},  {{ 10}},  {{ 11}},  {{ 12}},
     {{ 13}},  {{ 15}},  {{ 16}},  {{ 17}},  {{ 19}},  {{ 21}},  {{ 23}},  {{ 24}},  {{ 26}},  {{ 27}},  {{ 29}},  {{ 30}},  {{ 32}},  {{ 33}},  {{ 34}},  {{ 35}},  {{ 36}},  {{ 37}},  {{ 38}},  {{ 39}},
     {{ 40}},  {{ 41}},  {{ 42}},  {{ 43}},  {{ 44}},  {{ 45}},  {{ 45}},  {{ 46}},  {{ 47}},  {{ 48}},  {{ 49}},  {{ 49}},  {{ 50}},  {{ 51}},  {{ 52}},  {{ 52}},  {{ 53}},  {{ 54}},  {{ 55}},  {{ 55}},
     {{ 56}},  {{ 57}},  {{ 57}},  {{ 58}},  {{ 59}},  {{ 59}},  {{ 60}},  {{ 60}},  {{ 61}},  {{ 62}},  {{ 62}},  {{ 63}},  {{ 63}},  {{ 64}},  {{ 65}},  {{ 65}},  {{ 66}},  {{ 66}},  {{ 67}},  {{ 68}},
     {{ 68}},  {{ 69}},  {{ 69}},  {{ 70}},  {{ 70}},  {{ 71}},  {{ 71}},  {{ 72}},  {{ 72}},  {{ 73}},  {{ 73}},  {{ 74}},  {{ 74}},  {{ 75}},  {{ 75}},  {{ 76}},  {{ 76}},  {{ 77}},  {{ 77}},  {{ 78}},
     {{ 78}},  {{ 79}},  {{ 79}},  {{ 80}},  {{ 80}},  {{ 81}},  {{ 81}},  {{ 82}},  {{ 82}},  {{ 83}},  {{ 83}},  {{ 83}},  {{ 84}},  {{ 84}},  {{ 85}},  {{ 85}},  {{ 86}},  {{ 86}},  {{ 87}},  {{ 87}},
     {{ 87}},  {{ 88}},  {{ 88}},  {{ 89}},  {{ 89}},  {{ 90}},  {{ 90}},  {{ 90}},  {{ 91}},  {{ 91}},  {{ 92}},  {{ 92}},  {{ 92}},  {{ 93}},  {{ 93}},  {{ 94}},  {{ 94}},  {{ 94}},  {{ 95}},  {{ 95}},
     {{ 96}},  {{ 96}},  {{ 96}},  {{ 97}},  {{ 97}},  {{ 98}},  {{ 98}},  {{ 98}},  {{ 99}},  {{ 99}},  {{ 99}},  {{100}},  {{100}},  {{101}},  {{101}},  {{101}},  {{102}},  {{102}},  {{102}},  {{103}},
     {{103}},  {{103}},  {{104}},  {{104}},  {{105}},  {{105}},  {{105}},  {{106}},  {{106}},  {{106}},  {{107}},  {{107}},  {{107}},  {{108}},  {{108}},  {{108}},  {{109}},  {{109}},  {{109}},  {{110}},
     {{110}},  {{111}},  {{111}},  {{111}},  {{112}},  {{112}},  {{112}},  {{113}},  {{113}},  {{113}},  {{114}},  {{114}},  {{114}},  {{114}},  {{115}},  {{115}},  {{115}},  {{116}},  {{116}},  {{116}},
     {{117}},  {{117}},  {{117}},  {{118}},  {{118}},  {{118}},  {{119}},  {{119}},  {{119}},  {{120}},  {{120}},  {{120}},  {{121}},  {{121}},  {{121}},  {{121}},  {{122}},  {{122}},  {{122}},  {{123}},
     {{123}},  {{123}},  {{124}},  {{124}},  {{124}},  {{125}},  {{125}},  {{125}},  {{125}},  {{126}},  {{126}},  {{126}},  {{127}},  {{127}},  {{127}},  {{127}},  {{128}},  {{128}},  {{128}},  {{129}},
     {{129}},  {{129}},  {{130}},  {{130}},  {{130}},  {{130}},  {{131}},  {{131}},  {{131}},  {{132}},  {{132}},  {{132}},  {{132}},  {{133}},  {{133}},  {{133}},  {{133}},  {{134}},  {{134}},  {{134}},
     {{135}},  {{135}},  {{135}},  {{135}},  {{136}},  {{136}},  {{136}},  {{137}},  {{137}},  {{137}},  {{137}},  {{138}},  {{138}},  {{138}},  {{138}},  {{139}},  {{139}},  {{139}},  {{139}},  {{140}},
     {{140}},  {{140}},  {{140}},  {{141}},  {{141}},  {{141}},  {{142}},  {{142}},  {{142}},  {{142}},  {{143}},  {{143}},  {{143}},  {{143}},  {{144}},  {{144}},  {{144}},  {{144}},  {{145}},  {{145}},
     {{145}},  {{145}},  {{146}},  {{146}},  {{146}},  {{146}},  {{147}},  {{147}},  {{147}},  {{147}},  {{148}},  {{148}},  {{148}},  {{148}},  {{149}},  {{149}},  {{149}},  {{149}},  {{149}},  {{150}},
     {{150}},  {{150}},  {{150}},  {{151}},  {{151}},  {{151}},  {{151}},  {{152}},  {{152}},  {{152}},  {{152}},  {{153}},  {{153}},  {{153}},  {{153}},  {{154}},  {{154}},  {{154}},  {{154}},  {{154}},
     {{155}},  {{155}},  {{155}},  {{155}},  {{156}},  {{156}},  {{156}},  {{156}},  {{156}},  {{157}},  {{157}},  {{157}},  {{157}},  {{158}},  {{158}},  {{158}},  {{158}},  {{159}},  {{159}},  {{159}},
     {{159}},  {{159}},  {{160}},  {{160}},  {{160}},  {{160}},  {{160}},  {{161}},  {{161}},  {{161}},  {{161}},  {{162}},  {{162}},  {{162}},  {{162}},  {{162}},  {{163}},  {{163}},  {{163}},  {{163}},
     {{164}},  {{164}},  {{164}},  {{164}},  {{164}},  {{165}},  {{165}},  {{165}},  {{165}},  {{165}},  {{166}},  {{166}},  {{166}},  {{166}},  {{166}},  {{167}},  {{167}},  {{167}},  {{167}},  {{168}},
     {{168}},  {{168}},  {{168}},  {{168}},  {{169}},  {{169}},  {{169}},  {{169}},  {{169}},  {{170}},  {{170}},  {{170}},  {{170}},  {{170}},  {{171}},  {{171}},  {{171}},  {{171}},  {{171}},  {{172}},
     {{172}},  {{172}},  {{172}},  {{172}},  {{173}},  {{173}},  {{173}},  {{173}},  {{173}},  {{174}},  {{174}},  {{174}},  {{174}},  {{174}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},
     {{176}},  {{176}},  {{176}},  {{176}},  {{176}},  {{177}},  {{177}},  {{177}},  {{177}},  {{177}},  {{178}},  {{178}},  {{178}},  {{178}},  {{178}},  {{179}},  {{179}},  {{179}},  {{179}},  {{179}},
     {{179}},  {{180}},  {{180}},  {{180}},  {{180}},  {{180}},  {{181}},  {{181}},  {{181}},  {{181}},  {{181}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{183}},  {{183}},  {{183}},
     {{183}},  {{183}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{186}},  {{186}},  {{186}},  {{186}},  {{186}},  {{187}},
     {{187}},  {{187}},  {{187}},  {{187}},  {{187}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{189}},  {{189}},  {{189}},  {{189}},  {{189}},  {{190}},  {{190}},  {{190}},  {{190}},
     {{190}},  {{190}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},
     {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{197}},  {{197}},
     {{197}},  {{197}},  {{197}},  {{197}},  {{197}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{200}},  {{200}},  {{200}},
     {{200}},  {{200}},  {{200}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{203}},  {{203}},  {{203}},  {{203}},
     {{203}},  {{203}},  {{203}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{206}},  {{206}},  {{206}},  {{206}},
     {{206}},  {{206}},  {{206}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{209}},  {{209}},  {{209}},  {{209}},
     {{209}},  {{209}},  {{209}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{212}},  {{212}},  {{212}},
     {{212}},  {{212}},  {{212}},  {{212}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{215}},  {{215}},
     {{215}},  {{215}},  {{215}},  {{215}},  {{215}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},
     {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{220}},  {{220}},  {{220}},  {{220}},  {{220}},
     {{220}},  {{220}},  {{220}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{223}},  {{223}},
     {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},
     {{225}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{228}},  {{228}},  {{228}},
     {{228}},  {{228}},  {{228}},  {{228}},  {{228}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},
     {{230}},  {{230}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{233}},  {{233}},
     {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{235}},  {{235}},  {{235}},  {{235}},  {{235}},
     {{235}},  {{235}},  {{235}},  {{235}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},
     {{237}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{240}},
     {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{242}},  {{242}},  {{242}},
     {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{244}},  {{244}},  {{244}},  {{244}},  {{244}},
     {{244}},  {{244}},  {{244}},  {{244}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},
     {{246}},  {{246}},  {{246}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},
     {{248}},  {{248}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},
     {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},
     {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{255}},
     {{255}},  {{255}},  {{255}},  {{255}}
   }
  },

  .gc_gu_lut = {
    .gu_lut = {
     {{  0}},  {{  1}},  {{  1}},  {{  1}},  {{  2}},  {{  2}},  {{  3}},  {{  3}},  {{  4}},  {{  4}},  {{  5}},  {{  5}},  {{  6}},  {{  7}},  {{  7}},  {{  8}},  {{  9}},  {{ 10}},  {{ 11}},  {{ 12}},
     {{ 13}},  {{ 15}},  {{ 16}},  {{ 17}},  {{ 19}},  {{ 21}},  {{ 23}},  {{ 24}},  {{ 26}},  {{ 27}},  {{ 29}},  {{ 30}},  {{ 32}},  {{ 33}},  {{ 34}},  {{ 35}},  {{ 36}},  {{ 37}},  {{ 38}},  {{ 39}},
     {{ 40}},  {{ 41}},  {{ 42}},  {{ 43}},  {{ 44}},  {{ 45}},  {{ 45}},  {{ 46}},  {{ 47}},  {{ 48}},  {{ 49}},  {{ 49}},  {{ 50}},  {{ 51}},  {{ 52}},  {{ 52}},  {{ 53}},  {{ 54}},  {{ 55}},  {{ 55}},
     {{ 56}},  {{ 57}},  {{ 57}},  {{ 58}},  {{ 59}},  {{ 59}},  {{ 60}},  {{ 60}},  {{ 61}},  {{ 62}},  {{ 62}},  {{ 63}},  {{ 63}},  {{ 64}},  {{ 65}},  {{ 65}},  {{ 66}},  {{ 66}},  {{ 67}},  {{ 68}},
     {{ 68}},  {{ 69}},  {{ 69}},  {{ 70}},  {{ 70}},  {{ 71}},  {{ 71}},  {{ 72}},  {{ 72}},  {{ 73}},  {{ 73}},  {{ 74}},  {{ 74}},  {{ 75}},  {{ 75}},  {{ 76}},  {{ 76}},  {{ 77}},  {{ 77}},  {{ 78}},
     {{ 78}},  {{ 79}},  {{ 79}},  {{ 80}},  {{ 80}},  {{ 81}},  {{ 81}},  {{ 82}},  {{ 82}},  {{ 83}},  {{ 83}},  {{ 83}},  {{ 84}},  {{ 84}},  {{ 85}},  {{ 85}},  {{ 86}},  {{ 86}},  {{ 87}},  {{ 87}},
     {{ 87}},  {{ 88}},  {{ 88}},  {{ 89}},  {{ 89}},  {{ 90}},  {{ 90}},  {{ 90}},  {{ 91}},  {{ 91}},  {{ 92}},  {{ 92}},  {{ 92}},  {{ 93}},  {{ 93}},  {{ 94}},  {{ 94}},  {{ 94}},  {{ 95}},  {{ 95}},
     {{ 96}},  {{ 96}},  {{ 96}},  {{ 97}},  {{ 97}},  {{ 98}},  {{ 98}},  {{ 98}},  {{ 99}},  {{ 99}},  {{ 99}},  {{100}},  {{100}},  {{101}},  {{101}},  {{101}},  {{102}},  {{102}},  {{102}},  {{103}},
     {{103}},  {{103}},  {{104}},  {{104}},  {{105}},  {{105}},  {{105}},  {{106}},  {{106}},  {{106}},  {{107}},  {{107}},  {{107}},  {{108}},  {{108}},  {{108}},  {{109}},  {{109}},  {{109}},  {{110}},
     {{110}},  {{111}},  {{111}},  {{111}},  {{112}},  {{112}},  {{112}},  {{113}},  {{113}},  {{113}},  {{114}},  {{114}},  {{114}},  {{114}},  {{115}},  {{115}},  {{115}},  {{116}},  {{116}},  {{116}},
     {{117}},  {{117}},  {{117}},  {{118}},  {{118}},  {{118}},  {{119}},  {{119}},  {{119}},  {{120}},  {{120}},  {{120}},  {{121}},  {{121}},  {{121}},  {{121}},  {{122}},  {{122}},  {{122}},  {{123}},
     {{123}},  {{123}},  {{124}},  {{124}},  {{124}},  {{125}},  {{125}},  {{125}},  {{125}},  {{126}},  {{126}},  {{126}},  {{127}},  {{127}},  {{127}},  {{127}},  {{128}},  {{128}},  {{128}},  {{129}},
     {{129}},  {{129}},  {{130}},  {{130}},  {{130}},  {{130}},  {{131}},  {{131}},  {{131}},  {{132}},  {{132}},  {{132}},  {{132}},  {{133}},  {{133}},  {{133}},  {{133}},  {{134}},  {{134}},  {{134}},
     {{135}},  {{135}},  {{135}},  {{135}},  {{136}},  {{136}},  {{136}},  {{137}},  {{137}},  {{137}},  {{137}},  {{138}},  {{138}},  {{138}},  {{138}},  {{139}},  {{139}},  {{139}},  {{139}},  {{140}},
     {{140}},  {{140}},  {{140}},  {{141}},  {{141}},  {{141}},  {{142}},  {{142}},  {{142}},  {{142}},  {{143}},  {{143}},  {{143}},  {{143}},  {{144}},  {{144}},  {{144}},  {{144}},  {{145}},  {{145}},
     {{145}},  {{145}},  {{146}},  {{146}},  {{146}},  {{146}},  {{147}},  {{147}},  {{147}},  {{147}},  {{148}},  {{148}},  {{148}},  {{148}},  {{149}},  {{149}},  {{149}},  {{149}},  {{149}},  {{150}},
     {{150}},  {{150}},  {{150}},  {{151}},  {{151}},  {{151}},  {{151}},  {{152}},  {{152}},  {{152}},  {{152}},  {{153}},  {{153}},  {{153}},  {{153}},  {{154}},  {{154}},  {{154}},  {{154}},  {{154}},
     {{155}},  {{155}},  {{155}},  {{155}},  {{156}},  {{156}},  {{156}},  {{156}},  {{156}},  {{157}},  {{157}},  {{157}},  {{157}},  {{158}},  {{158}},  {{158}},  {{158}},  {{159}},  {{159}},  {{159}},
     {{159}},  {{159}},  {{160}},  {{160}},  {{160}},  {{160}},  {{160}},  {{161}},  {{161}},  {{161}},  {{161}},  {{162}},  {{162}},  {{162}},  {{162}},  {{162}},  {{163}},  {{163}},  {{163}},  {{163}},
     {{164}},  {{164}},  {{164}},  {{164}},  {{164}},  {{165}},  {{165}},  {{165}},  {{165}},  {{165}},  {{166}},  {{166}},  {{166}},  {{166}},  {{166}},  {{167}},  {{167}},  {{167}},  {{167}},  {{168}},
     {{168}},  {{168}},  {{168}},  {{168}},  {{169}},  {{169}},  {{169}},  {{169}},  {{169}},  {{170}},  {{170}},  {{170}},  {{170}},  {{170}},  {{171}},  {{171}},  {{171}},  {{171}},  {{171}},  {{172}},
     {{172}},  {{172}},  {{172}},  {{172}},  {{173}},  {{173}},  {{173}},  {{173}},  {{173}},  {{174}},  {{174}},  {{174}},  {{174}},  {{174}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},
     {{176}},  {{176}},  {{176}},  {{176}},  {{176}},  {{177}},  {{177}},  {{177}},  {{177}},  {{177}},  {{178}},  {{178}},  {{178}},  {{178}},  {{178}},  {{179}},  {{179}},  {{179}},  {{179}},  {{179}},
     {{179}},  {{180}},  {{180}},  {{180}},  {{180}},  {{180}},  {{181}},  {{181}},  {{181}},  {{181}},  {{181}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{183}},  {{183}},  {{183}},
     {{183}},  {{183}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{186}},  {{186}},  {{186}},  {{186}},  {{186}},  {{187}},
     {{187}},  {{187}},  {{187}},  {{187}},  {{187}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{189}},  {{189}},  {{189}},  {{189}},  {{189}},  {{190}},  {{190}},  {{190}},  {{190}},
     {{190}},  {{190}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},
     {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{197}},  {{197}},
     {{197}},  {{197}},  {{197}},  {{197}},  {{197}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{200}},  {{200}},  {{200}},
     {{200}},  {{200}},  {{200}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{203}},  {{203}},  {{203}},  {{203}},
     {{203}},  {{203}},  {{203}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{206}},  {{206}},  {{206}},  {{206}},
     {{206}},  {{206}},  {{206}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{209}},  {{209}},  {{209}},  {{209}},
     {{209}},  {{209}},  {{209}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{212}},  {{212}},  {{212}},
     {{212}},  {{212}},  {{212}},  {{212}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{215}},  {{215}},
     {{215}},  {{215}},  {{215}},  {{215}},  {{215}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},
     {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{220}},  {{220}},  {{220}},  {{220}},  {{220}},
     {{220}},  {{220}},  {{220}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{223}},  {{223}},
     {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},
     {{225}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{228}},  {{228}},  {{228}},
     {{228}},  {{228}},  {{228}},  {{228}},  {{228}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},
     {{230}},  {{230}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{233}},  {{233}},
     {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{235}},  {{235}},  {{235}},  {{235}},  {{235}},
     {{235}},  {{235}},  {{235}},  {{235}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},
     {{237}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{240}},
     {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{242}},  {{242}},  {{242}},
     {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{244}},  {{244}},  {{244}},  {{244}},  {{244}},
     {{244}},  {{244}},  {{244}},  {{244}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},
     {{246}},  {{246}},  {{246}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},
     {{248}},  {{248}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},
     {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},
     {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{255}},
     {{255}},  {{255}},  {{255}},  {{255}}
    }
  },

  .gc_bv_lut = {
    .bv_lut = {
     {{  0}},  {{  1}},  {{  1}},  {{  1}},  {{  2}},  {{  2}},  {{  3}},  {{  3}},  {{  4}},  {{  4}},  {{  5}},  {{  5}},  {{  6}},  {{  7}},  {{  7}},  {{  8}},  {{  9}},  {{ 10}},  {{ 11}},  {{ 12}},
     {{ 13}},  {{ 15}},  {{ 16}},  {{ 17}},  {{ 19}},  {{ 21}},  {{ 23}},  {{ 24}},  {{ 26}},  {{ 27}},  {{ 29}},  {{ 30}},  {{ 32}},  {{ 33}},  {{ 34}},  {{ 35}},  {{ 36}},  {{ 37}},  {{ 38}},  {{ 39}},
     {{ 40}},  {{ 41}},  {{ 42}},  {{ 43}},  {{ 44}},  {{ 45}},  {{ 45}},  {{ 46}},  {{ 47}},  {{ 48}},  {{ 49}},  {{ 49}},  {{ 50}},  {{ 51}},  {{ 52}},  {{ 52}},  {{ 53}},  {{ 54}},  {{ 55}},  {{ 55}},
     {{ 56}},  {{ 57}},  {{ 57}},  {{ 58}},  {{ 59}},  {{ 59}},  {{ 60}},  {{ 60}},  {{ 61}},  {{ 62}},  {{ 62}},  {{ 63}},  {{ 63}},  {{ 64}},  {{ 65}},  {{ 65}},  {{ 66}},  {{ 66}},  {{ 67}},  {{ 68}},
     {{ 68}},  {{ 69}},  {{ 69}},  {{ 70}},  {{ 70}},  {{ 71}},  {{ 71}},  {{ 72}},  {{ 72}},  {{ 73}},  {{ 73}},  {{ 74}},  {{ 74}},  {{ 75}},  {{ 75}},  {{ 76}},  {{ 76}},  {{ 77}},  {{ 77}},  {{ 78}},
     {{ 78}},  {{ 79}},  {{ 79}},  {{ 80}},  {{ 80}},  {{ 81}},  {{ 81}},  {{ 82}},  {{ 82}},  {{ 83}},  {{ 83}},  {{ 83}},  {{ 84}},  {{ 84}},  {{ 85}},  {{ 85}},  {{ 86}},  {{ 86}},  {{ 87}},  {{ 87}},
     {{ 87}},  {{ 88}},  {{ 88}},  {{ 89}},  {{ 89}},  {{ 90}},  {{ 90}},  {{ 90}},  {{ 91}},  {{ 91}},  {{ 92}},  {{ 92}},  {{ 92}},  {{ 93}},  {{ 93}},  {{ 94}},  {{ 94}},  {{ 94}},  {{ 95}},  {{ 95}},
     {{ 96}},  {{ 96}},  {{ 96}},  {{ 97}},  {{ 97}},  {{ 98}},  {{ 98}},  {{ 98}},  {{ 99}},  {{ 99}},  {{ 99}},  {{100}},  {{100}},  {{101}},  {{101}},  {{101}},  {{102}},  {{102}},  {{102}},  {{103}},
     {{103}},  {{103}},  {{104}},  {{104}},  {{105}},  {{105}},  {{105}},  {{106}},  {{106}},  {{106}},  {{107}},  {{107}},  {{107}},  {{108}},  {{108}},  {{108}},  {{109}},  {{109}},  {{109}},  {{110}},
     {{110}},  {{111}},  {{111}},  {{111}},  {{112}},  {{112}},  {{112}},  {{113}},  {{113}},  {{113}},  {{114}},  {{114}},  {{114}},  {{114}},  {{115}},  {{115}},  {{115}},  {{116}},  {{116}},  {{116}},
     {{117}},  {{117}},  {{117}},  {{118}},  {{118}},  {{118}},  {{119}},  {{119}},  {{119}},  {{120}},  {{120}},  {{120}},  {{121}},  {{121}},  {{121}},  {{121}},  {{122}},  {{122}},  {{122}},  {{123}},
     {{123}},  {{123}},  {{124}},  {{124}},  {{124}},  {{125}},  {{125}},  {{125}},  {{125}},  {{126}},  {{126}},  {{126}},  {{127}},  {{127}},  {{127}},  {{127}},  {{128}},  {{128}},  {{128}},  {{129}},
     {{129}},  {{129}},  {{130}},  {{130}},  {{130}},  {{130}},  {{131}},  {{131}},  {{131}},  {{132}},  {{132}},  {{132}},  {{132}},  {{133}},  {{133}},  {{133}},  {{133}},  {{134}},  {{134}},  {{134}},
     {{135}},  {{135}},  {{135}},  {{135}},  {{136}},  {{136}},  {{136}},  {{137}},  {{137}},  {{137}},  {{137}},  {{138}},  {{138}},  {{138}},  {{138}},  {{139}},  {{139}},  {{139}},  {{139}},  {{140}},
     {{140}},  {{140}},  {{140}},  {{141}},  {{141}},  {{141}},  {{142}},  {{142}},  {{142}},  {{142}},  {{143}},  {{143}},  {{143}},  {{143}},  {{144}},  {{144}},  {{144}},  {{144}},  {{145}},  {{145}},
     {{145}},  {{145}},  {{146}},  {{146}},  {{146}},  {{146}},  {{147}},  {{147}},  {{147}},  {{147}},  {{148}},  {{148}},  {{148}},  {{148}},  {{149}},  {{149}},  {{149}},  {{149}},  {{149}},  {{150}},
     {{150}},  {{150}},  {{150}},  {{151}},  {{151}},  {{151}},  {{151}},  {{152}},  {{152}},  {{152}},  {{152}},  {{153}},  {{153}},  {{153}},  {{153}},  {{154}},  {{154}},  {{154}},  {{154}},  {{154}},
     {{155}},  {{155}},  {{155}},  {{155}},  {{156}},  {{156}},  {{156}},  {{156}},  {{156}},  {{157}},  {{157}},  {{157}},  {{157}},  {{158}},  {{158}},  {{158}},  {{158}},  {{159}},  {{159}},  {{159}},
     {{159}},  {{159}},  {{160}},  {{160}},  {{160}},  {{160}},  {{160}},  {{161}},  {{161}},  {{161}},  {{161}},  {{162}},  {{162}},  {{162}},  {{162}},  {{162}},  {{163}},  {{163}},  {{163}},  {{163}},
     {{164}},  {{164}},  {{164}},  {{164}},  {{164}},  {{165}},  {{165}},  {{165}},  {{165}},  {{165}},  {{166}},  {{166}},  {{166}},  {{166}},  {{166}},  {{167}},  {{167}},  {{167}},  {{167}},  {{168}},
     {{168}},  {{168}},  {{168}},  {{168}},  {{169}},  {{169}},  {{169}},  {{169}},  {{169}},  {{170}},  {{170}},  {{170}},  {{170}},  {{170}},  {{171}},  {{171}},  {{171}},  {{171}},  {{171}},  {{172}},
     {{172}},  {{172}},  {{172}},  {{172}},  {{173}},  {{173}},  {{173}},  {{173}},  {{173}},  {{174}},  {{174}},  {{174}},  {{174}},  {{174}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},  {{175}},
     {{176}},  {{176}},  {{176}},  {{176}},  {{176}},  {{177}},  {{177}},  {{177}},  {{177}},  {{177}},  {{178}},  {{178}},  {{178}},  {{178}},  {{178}},  {{179}},  {{179}},  {{179}},  {{179}},  {{179}},
     {{179}},  {{180}},  {{180}},  {{180}},  {{180}},  {{180}},  {{181}},  {{181}},  {{181}},  {{181}},  {{181}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{182}},  {{183}},  {{183}},  {{183}},
     {{183}},  {{183}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{184}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{185}},  {{186}},  {{186}},  {{186}},  {{186}},  {{186}},  {{187}},
     {{187}},  {{187}},  {{187}},  {{187}},  {{187}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{188}},  {{189}},  {{189}},  {{189}},  {{189}},  {{189}},  {{190}},  {{190}},  {{190}},  {{190}},
     {{190}},  {{190}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{191}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{192}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},  {{193}},
     {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{194}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{195}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{196}},  {{197}},  {{197}},
     {{197}},  {{197}},  {{197}},  {{197}},  {{197}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{198}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{199}},  {{200}},  {{200}},  {{200}},
     {{200}},  {{200}},  {{200}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{201}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{202}},  {{203}},  {{203}},  {{203}},  {{203}},
     {{203}},  {{203}},  {{203}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{204}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{205}},  {{206}},  {{206}},  {{206}},  {{206}},
     {{206}},  {{206}},  {{206}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{207}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{208}},  {{209}},  {{209}},  {{209}},  {{209}},
     {{209}},  {{209}},  {{209}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{210}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{211}},  {{212}},  {{212}},  {{212}},
     {{212}},  {{212}},  {{212}},  {{212}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{213}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{214}},  {{215}},  {{215}},
     {{215}},  {{215}},  {{215}},  {{215}},  {{215}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{216}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},  {{217}},
     {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{218}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{219}},  {{220}},  {{220}},  {{220}},  {{220}},  {{220}},
     {{220}},  {{220}},  {{220}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{221}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{222}},  {{223}},  {{223}},
     {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{223}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{224}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},  {{225}},
     {{225}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{226}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{227}},  {{228}},  {{228}},  {{228}},
     {{228}},  {{228}},  {{228}},  {{228}},  {{228}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{229}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},  {{230}},
     {{230}},  {{230}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{231}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{232}},  {{233}},  {{233}},
     {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{233}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{234}},  {{235}},  {{235}},  {{235}},  {{235}},  {{235}},
     {{235}},  {{235}},  {{235}},  {{235}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{236}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},  {{237}},
     {{237}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{238}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{239}},  {{240}},
     {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{240}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{241}},  {{242}},  {{242}},  {{242}},
     {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{242}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{243}},  {{244}},  {{244}},  {{244}},  {{244}},  {{244}},
     {{244}},  {{244}},  {{244}},  {{244}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{245}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},  {{246}},
     {{246}},  {{246}},  {{246}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{247}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},  {{248}},
     {{248}},  {{248}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{249}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},  {{250}},
     {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{251}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},  {{252}},
     {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{253}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{254}},  {{255}},
     {{255}},  {{255}},  {{255}},  {{255}}
    }
  },

  /* Color space conversion */
  .chroma = {
      .coeff_01_00 = {{    526, 1032 }},
      .coeff_10_02 = {{    201, 900  }},
      .coeff_12_11 = {{   -753,-146  }},
      .coeff_21_20 = {{   -304,-596  }},
      .coeff_22    = {{    900       }},
      .offset_ry   = {{  0, 16  }},
      .clip_ry     = {{ 16, 235 }},
      .offset_gu   = {{  0, 128 }},
      .clip_gu     = {{ 16, 240 }},
      .offset_bv   = {{  0, 128 }},
      .clip_bv     = {{ 16, 240 }},
    },

  /* YUV statistics */
  .statistics_yuv = {
    .measure_req           = {{1,1}},
    .measure_status        = {{0,0}},
    .window_pos_x          = {{ .window_x_start = 0, .window_x_end = MT9F002_SENSOR_WIDTH }},
    .window_pos_y          = {{ .window_y_start = 0, .window_y_end = MT9F002_SENSOR_HEIGHT }},
    .circle_pos_x_center   = {{ MT9F002_FISHEYE_CENTER_X }},
    .circle_pos_x_squared  = {{ MT9F002_FISHEYE_CENTER_X * MT9F002_FISHEYE_CENTER_X }},
    .circle_pos_y_center   = {{ MT9F002_FISHEYE_CENTER_Y }},
    .circle_pos_y_squared  = {{ MT9F002_FISHEYE_CENTER_Y * MT9F002_FISHEYE_CENTER_Y }},
    .circle_radius_squared = {{ MT9F002_FISHEYE_RADIUS * MT9F002_FISHEYE_RADIUS }},
    .increments_log2       = {{ 7, 7 }},
    .awb_threshold         = {{ 33 }},
  },

  /* Edge enhancement + Color reduction filter */
  .eecrf = {
    .ee_kernel_coeff = { {{935}}, {{-30}}, {{-99}}, {{-45}}, {{-27}},  {{-6}} },
    .crf_kernel_coeff = { {{41}},  {{41}},  {{41}},  {{41}},  {{41}},  {{41}} },
    .m_coeff = {{ 16 }},
    .d_coeff = {{ 64 }}
  },

  .eecrf_lut = {
     /* Office
     .ee_lut = {
     {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},
     {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 0}},  {{ 1}},  {{ 1}},  {{ 1}},  {{ 1}},
     {{ 1}},  {{ 1}},  {{ 2}},  {{ 2}},  {{ 2}},  {{ 2}},  {{ 2}},  {{ 3}},  {{ 3}},  {{ 3}},
     {{ 3}},  {{ 3}},  {{ 3}},  {{ 4}},  {{ 4}},  {{ 4}},  {{ 4}},  {{ 4}},  {{ 4}},  {{ 5}},
     {{ 5}},  {{ 5}},  {{ 5}},  {{ 5}},  {{ 6}},  {{ 6}},  {{ 6}},  {{ 6}},  {{ 6}},  {{ 6}},
     {{ 7}},  {{ 7}},  {{ 7}},  {{ 7}},  {{ 7}},  {{ 8}},  {{ 8}},  {{ 8}},  {{ 8}},  {{ 8}},
     {{ 8}},  {{ 9}},  {{ 9}},  {{ 9}},  {{ 9}},  {{ 9}},  {{ 9}},  {{10}},  {{10}},  {{10}},
     {{10}},  {{10}},  {{11}},  {{11}},  {{11}},  {{11}},  {{11}},  {{11}},  {{12}},  {{12}},
     {{12}},  {{12}},  {{12}},  {{12}},  {{13}},  {{13}},  {{13}},  {{13}},  {{13}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},
     {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{15}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},
     {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{14}},  {{13}},  {{13}},
     {{12}},  {{11}},  {{ 8}},  {{ 6}},  {{ 3}},  {{ 1}}
    }*/
    /* Cloudy */
    .ee_lut = {
            {{0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 1}},
            {{1}}, {{ 1}}, {{ 1}}, {{ 2}}, {{ 2}}, {{ 2}}, {{ 2}}, {{ 3}}, {{ 3}}, {{ 3}},
            {{4}}, {{ 4}}, {{ 4}}, {{ 4}}, {{ 5}}, {{ 5}}, {{ 5}}, {{ 5}}, {{ 6}}, {{ 6}},
            {{6}}, {{ 6}}, {{ 7}}, {{ 7}}, {{ 7}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 9}},
            {{9}}, {{ 9}}, {{ 9}}, {{10}}, {{10}}, {{10}}, {{10}}, {{11}}, {{11}}, {{11}},
            {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}},
            {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}},
            {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}},
            {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{11}}, {{10}}, {{10}},
            {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}},
            {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}},
            {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}},
            {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{10}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}},
            {{9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}},
            {{9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}},
            {{9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}}, {{ 9}},
            {{9}}, {{ 9}}, {{ 9}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}},
            {{8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}},
            {{8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}},
            {{8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 8}}, {{ 7}},
            {{7}}, {{ 7}}, {{ 7}}, {{ 7}}, {{ 7}}, {{ 7}}, {{ 7}}, {{ 6}}, {{ 6}}, {{ 6}},
            {{6}}, {{ 6}}, {{ 6}}, {{ 6}}, {{ 6}}, {{ 5}}, {{ 5}}, {{ 5}}, {{ 5}}, {{ 5}},
            {{5}}, {{ 5}}, {{ 4}}, {{ 4}}, {{ 4}}, {{ 4}}, {{ 4}}, {{ 4}}, {{ 3}}, {{ 3}},
            {{3}}, {{ 3}}, {{ 3}}, {{ 3}}, {{ 3}}, {{ 3}}, {{ 2}}, {{ 2}}, {{ 2}}, {{ 2}},
            {{2}}, {{ 2}}, {{ 2}}, {{ 1}}, {{ 1}}, {{ 1}}, {{ 1}}, {{ 1}}, {{ 1}}, {{ 0}},
            {{0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0}}, {{ 0 }}
    }
  },

  /* Bypass 3D for now */

  /* Bypass Drop for now */


  /* Bypass for YUV chain */
  .chain_yuv_inter = {{
      .ee_crf_bypass = 0,
      .i3d_lut_bypass = 1,
      .drop_bypass = 1,
  }},

};

#endif /* _LIBISP_CONFIG_H */
